﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VioletDevelopmentLaboratory.Net.Web;
using VioletDevelopmentLaboratory.Net.Web.Component;

public partial class vboard_component_board_template_default_view_sub_file : BoardSubPartBase
{
	private BoardThread CurrentThread;
	private AttachmentFileInfoCollection CurrentAttachmentFileInfoCollection;

	protected void Page_Init(Object sender, EventArgs e)
	{
		this.CurrentThread = (BoardThread)this.Page.Items["CurrentThread"];
		this.CurrentAttachmentFileInfoCollection = (AttachmentFileInfoCollection)this.Page.Items["CurrentAttachmentFileInfoCollection"];
	}

	protected void Page_Load(object sender, EventArgs e)
	{
		if (!Page.IsPostBack)
		{
			if (!this.CurrentThread.IsDeleted && !this.CurrentThread.IsBlocked)
			{
				if (this.CurrentAttachmentFileInfoCollection != null)
				{
					if (base.CurrentUserInfo.IsAdministrator || base.CurrentUserInfo.IsSysop(base.CurrentBoard) || base.CurrentUserFileDownload)
					{
						FileRepeater.DataSource = this.CurrentAttachmentFileInfoCollection;
						FileRepeater.DataBind();
					}
				}
			}
		}
	}
}
